package com.dynamixsoftware.printershare;

import android.app.ActivityManager;
import android.app.ActivityManager.MemoryInfo;
import android.app.AlertDialog.Builder;
import android.content.ContentResolver;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
import android.graphics.Picture;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.MenuItem;
import android.view.View;
import com.dynamixsoftware.printershare.data.Paper;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.RandomAccessFile;
import java.util.Vector;

public class ActivityPrintDocuments
  extends ActivityPrint
{
  public static final String fonts_pkg = "lib_extra_fonts";
  public static final String fonts_ver = "1.0.2";
  private static volatile boolean lib_loaded = false;
  private static volatile Object lib_obj;
  public static final String render_lib = "libdocsrenderJNI.so";
  public static final String render_pkg = "lib_docsrender";
  public static final String render_ver = "3.4.5";
  private File doc_file = null;
  private Vector<DocPicture> doc_pages;
  private CharSequence[] printSizeOptions;
  private int print_size = 1;
  private int sel_print_size;
  private File tf = new File(App.getTempDir(), "printershare_doc.tmp");
  private Thread ut;
  private Thread wt;
  
  private boolean checkRender()
    throws Exception
  {
    if (!"3.4.5".equals(this.prefs.getString("lib_docsrender", ""))) {
      return false;
    }
    if (!"1.0.2".equals(this.prefs.getString("lib_extra_fonts", ""))) {
      return false;
    }
    File localFile1 = new File(App.getFilesDirInt("lib_docsrender"), "libdocsrenderJNI.so");
    if (!localFile1.exists()) {
      return false;
    }
    File localFile2 = App.getFilesDirExt("lib_extra_fonts");
    if (!localFile2.exists()) {
      return false;
    }
    if (!new File(App.getFilesDirExt("lib_docsrender"), "DroidSansFull.ttf").exists()) {
      return false;
    }
    if (!lib_loaded)
    {
      System.load(localFile1.getAbsolutePath());
      lib_loaded = true;
    }
    ActivityManager localActivityManager = (ActivityManager)getSystemService("activity");
    int i = 0;
    if (localActivityManager != null)
    {
      ActivityManager.MemoryInfo localMemoryInfo = new ActivityManager.MemoryInfo();
      localActivityManager.getMemoryInfo(localMemoryInfo);
      i = (int)(localMemoryInfo.availMem / 1024L);
    }
    File localFile3 = new File("/proc/meminfo");
    if (localFile3.exists()) {}
    try
    {
      FileInputStream localFileInputStream = new FileInputStream(localFile3);
      DataInputStream localDataInputStream = new DataInputStream(localFileInputStream);
      String str2;
      do
      {
        str2 = localDataInputStream.readLine();
      } while ((str2 != null) && (!str2.startsWith("MemTotal:")));
      localDataInputStream.close();
      m = 0;
      if (str2 != null)
      {
        int i1 = str2.indexOf(":");
        int i2 = str2.indexOf("kB");
        m = 0;
        if (i1 > 0)
        {
          m = 0;
          if (i2 > i1)
          {
            int i3 = Integer.parseInt(str2.substring(i1 + 1, i2).trim());
            m = i3;
          }
        }
      }
    }
    catch (Exception localException)
    {
      String str1;
      String[] arrayOfString;
      for (;;)
      {
        int n;
        File[] arrayOfFile;
        int j;
        localException.printStackTrace();
        App.reportThrowable(localException);
        int m = 0;
      }
      int k = K2render.init(arrayOfString, str1, i * 1024);
      if (k == 0) {
        break label469;
      }
      RenderError localRenderError = new RenderError(k);
      throw localRenderError;
      lib_obj = this;
    }
    if (m != -1)
    {
      n = m - 65536;
      if (n > i) {
        i = n;
      }
    }
    if (i < 16384) {
      i = 16384;
    }
    str1 = App.getTempDir().getAbsolutePath();
    arrayOfFile = localFile2.listFiles();
    arrayOfString = new String[1 + arrayOfFile.length];
    arrayOfString[0] = new File(App.getFilesDirExt("lib_docsrender"), "DroidSansFull.ttf").getAbsolutePath();
    for (j = 0; j < arrayOfFile.length; j++) {
      arrayOfString[(j + 1)] = arrayOfFile[j].getAbsolutePath();
    }
    label469:
    return true;
  }
  
  private void destroyLibViewer()
  {
    if (this == lib_obj) {
      try
      {
        int i = K2render.closeFile();
        if (i != 0) {
          throw new RenderError(i);
        }
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
        App.reportThrowable(localException);
      }
    }
    int j;
    do
    {
      lib_obj = null;
      return;
      j = K2render.destroy();
    } while (j == 0);
    throw new RenderError(j);
  }
  
  protected void createPages()
  {
    this.pages = new Vector();
    for (int i = 0; i < this.doc_pages.size(); i++) {
      this.pages.add(new ActivityPrint.Page((Picture)this.doc_pages.get(i)));
    }
  }
  
  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    CharSequence[] arrayOfCharSequence = new CharSequence[3];
    arrayOfCharSequence[0] = getResources().getString(2131099795);
    arrayOfCharSequence[1] = getResources().getString(2131099796);
    arrayOfCharSequence[2] = getResources().getString(2131099797);
    this.printSizeOptions = arrayOfCharSequence;
    this.print_size = this.prefs.getInt(getActivityClassName() + "#print_size", this.print_size);
  }
  
  public void onCreateContextMenu(ContextMenu paramContextMenu, View paramView, ContextMenu.ContextMenuInfo paramContextMenuInfo)
  {
    paramContextMenu.setHeaderTitle(2131099789);
    paramContextMenu.add(0, 100, 0, 2131099794);
    paramContextMenu.add(0, 21, 0, 2131099804);
    paramContextMenu.add(0, 22, 0, 2131099805);
    paramContextMenu.add(0, 10, 0, 2131099806);
    paramContextMenu.add(0, 11, 0, 2131099807);
    paramContextMenu.add(0, 12, 0, 2131099651);
  }
  
  public void onDestroy()
  {
    super.onDestroy();
    destroyLibViewer();
    if (this.tf.exists()) {
      this.tf.delete();
    }
  }
  
  public boolean onMenuItemSelected(int paramInt, MenuItem paramMenuItem)
  {
    switch (paramMenuItem.getItemId())
    {
    default: 
      return super.onMenuItemSelected(paramInt, paramMenuItem);
    }
    new AlertDialog.Builder(this).setTitle(2131099794).setPositiveButton(2131099703, new DialogInterface.OnClickListener()
    {
      public void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt)
      {
        ActivityPrintDocuments.access$002(ActivityPrintDocuments.this, ActivityPrintDocuments.this.sel_print_size);
        SharedPreferences.Editor localEditor = ActivityPrintDocuments.this.prefs.edit();
        localEditor.putInt(ActivityPrintDocuments.this.getActivityClassName() + "#print_size", ActivityPrintDocuments.this.print_size);
        localEditor.commit();
        ActivityPrintDocuments.this.need_update_pages = true;
        ActivityPrintDocuments.this.update();
      }
    }).setNegativeButton(2131099707, null).setSingleChoiceItems(this.printSizeOptions, this.print_size, new DialogInterface.OnClickListener()
    {
      public void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt)
      {
        ActivityPrintDocuments.access$102(ActivityPrintDocuments.this, paramAnonymousInt);
      }
    }).show();
    return true;
  }
  
  protected void showPreview(final ActivityPrint.Page paramPage)
  {
    showProgress(getResources().getString(2131099746));
    this.ut = new Thread()
    {
      public void run()
      {
        int i = 150;
        App.freeMem();
        try
        {
          if (!paramPage.landscape) {
            break label199;
          }
          Bitmap localBitmap2 = Bitmap.createBitmap(i * ActivityPrintDocuments.this.paper.height / 254, i * ActivityPrintDocuments.this.paper.width / 254, Bitmap.Config.ARGB_8888);
          localObject = localBitmap2;
        }
        catch (OutOfMemoryError localOutOfMemoryError)
        {
          label60:
          label199:
          do
          {
            Picture local1;
            Object localObject = null;
          } while (i == 100);
          i = 100;
        }
        if (localObject != null)
        {
          local1 = new Picture()
          {
            Bitmap cbmp = this.val$xbm;
            
            protected void finalize()
              throws Throwable
            {
              super.finalize();
              if (this.cbmp != null) {
                this.cbmp = null;
              }
            }
          };
          new App.PCanvas((Bitmap)localObject).drawPicture(paramPage.getPicture(), new Rect(0, 0, ((Bitmap)localObject).getWidth(), ((Bitmap)localObject).getHeight()));
          local1.beginRecording(((Bitmap)localObject).getWidth(), ((Bitmap)localObject).getHeight()).drawBitmap((Bitmap)localObject, 0.0F, 0.0F, App.newPaint());
          local1.endRecording();
        }
        for (ActivityPrint.pp = local1;; ActivityPrint.pp = paramPage.getPicture())
        {
          Intent localIntent = new Intent();
          localIntent.setClass(ActivityPrintDocuments.this, ActivityPreview.class);
          ActivityPrintDocuments.this.startActivityForResult(localIntent, 10);
          ActivityPrintDocuments.this.runOnUiThread(new Runnable()
          {
            public void run()
            {
              ActivityPrintDocuments.this.hideProgress();
            }
          });
          ActivityPrintDocuments.access$202(ActivityPrintDocuments.this, null);
          return;
          Bitmap localBitmap1 = Bitmap.createBitmap(i * ActivityPrintDocuments.this.paper.width / 254, i * ActivityPrintDocuments.this.paper.height / 254, Bitmap.Config.ARGB_8888);
          localObject = localBitmap1;
          break label60;
          break;
        }
      }
    };
    this.ut.start();
  }
  
  protected void update()
  {
    if (this.doc_pages == null)
    {
      this.doc_pages = new Vector();
      this.need_update_pages = false;
      if (lib_obj == null) {
        break label58;
      }
      destroyLibViewer();
    }
    label58:
    for (this.wt = new CheckRenderThread(null);; this.wt = new CheckRenderThread(Boolean.valueOf(true)))
    {
      this.wt.start();
      super.update();
      return;
    }
  }
  
  class CheckRenderThread
    extends Thread
  {
    private Boolean first_check;
    
    public CheckRenderThread(Boolean paramBoolean)
    {
      this.first_check = paramBoolean;
    }
    
    public void run()
    {
      ActivityPrintDocuments.this.runOnUiThread(new Runnable()
      {
        public void run()
        {
          ActivityPrintDocuments.this.showProgress(ActivityPrintDocuments.this.getResources().getString(2131099746));
        }
      });
      int i;
      if (this.first_check == null)
      {
        i = 1;
        if (i != 0) {
          break label120;
        }
        if (this.first_check.booleanValue() != true) {
          break label93;
        }
        ActivityPrintDocuments.this.runOnUiThread(new Runnable()
        {
          public void run()
          {
            ActivityPrintDocuments.this.hideProgress();
            new AlertDialog.Builder(ActivityPrintDocuments.this).setIcon(17301543).setTitle(2131099857).setMessage(2131099860).setPositiveButton(2131099705, new DialogInterface.OnClickListener()
            {
              public void onClick(DialogInterface paramAnonymous2DialogInterface, int paramAnonymous2Int)
              {
                ActivityPrintDocuments.access$602(ActivityPrintDocuments.this, new ActivityPrintDocuments.InstallRenderThread(ActivityPrintDocuments.this));
                ActivityPrintDocuments.this.wt.start();
              }
            }).setNegativeButton(2131099706, new DialogInterface.OnClickListener()
            {
              public void onClick(DialogInterface paramAnonymous2DialogInterface, int paramAnonymous2Int) {}
            }).show();
          }
        });
      }
      for (;;)
      {
        for (;;)
        {
          ActivityPrintDocuments.access$602(ActivityPrintDocuments.this, null);
          return;
          try
          {
            boolean bool = ActivityPrintDocuments.this.checkRender();
            i = bool;
          }
          catch (Throwable localThrowable)
          {
            localThrowable.printStackTrace();
            App.reportThrowable(localThrowable);
            i = 0;
          }
        }
        break;
        label93:
        ActivityPrintDocuments.this.last_error = "Cannot install Docs Render library. An unknown error has ccurred.";
        ActivityPrintDocuments.this.runOnUiThread(new Runnable()
        {
          public void run()
          {
            ActivityPrintDocuments.this.hideProgress();
            ActivityPrintDocuments.this.displayLastError(new DialogInterface.OnClickListener()
            {
              public void onClick(DialogInterface paramAnonymous2DialogInterface, int paramAnonymous2Int) {}
            });
          }
        });
      }
      label120:
      ActivityPrintDocuments.access$602(ActivityPrintDocuments.this, new ActivityPrintDocuments.ConvertPagesThread(ActivityPrintDocuments.this));
      ActivityPrintDocuments.this.wt.start();
    }
  }
  
  class ConvertPagesThread
    extends Thread
  {
    ConvertPagesThread() {}
    
    public void run()
    {
      ActivityPrintDocuments localActivityPrintDocuments1 = ActivityPrintDocuments.this;
      Runnable local1 = new Runnable()
      {
        public void run()
        {
          ActivityPrintDocuments.this.showProgress(ActivityPrintDocuments.this.getResources().getString(2131099757));
        }
      };
      localActivityPrintDocuments1.runOnUiThread(local1);
      ActivityPrintDocuments.this.last_error = null;
      localIntent = null;
      try
      {
        File localFile1 = ActivityPrintDocuments.this.doc_file;
        localIntent = null;
        if (localFile1 != null) {
          break label447;
        }
        localIntent = ActivityPrintDocuments.this.getIntent();
        if (!"android.intent.action.SEND".equals(localIntent.getAction())) {
          break label428;
        }
        localUri = (Uri)localIntent.getExtras().get("android.intent.extra.STREAM");
      }
      catch (Exception localException)
      {
        for (;;)
        {
          Uri localUri;
          String str2;
          String str3;
          int j;
          int k;
          ActivityPrintDocuments localActivityPrintDocuments4;
          File localFile2;
          InputStream localInputStream;
          FileOutputStream localFileOutputStream;
          byte[] arrayOfByte;
          localException.printStackTrace();
          ActivityPrintDocuments.this.last_error = ("Internal Error: " + localException.getMessage());
          String str1;
          if (localIntent != null)
          {
            str1 = localIntent.toString();
            App.reportThrowable(localException, str1);
            if (ActivityPrintDocuments.this.last_error != null) {
              break label624;
            }
            ActivityPrintDocuments localActivityPrintDocuments3 = ActivityPrintDocuments.this;
            Runnable local4 = new Runnable()
            {
              public void run()
              {
                ActivityPrintDocuments.this.need_update_pages = true;
                ActivityPrintDocuments.this.update();
              }
            };
            localActivityPrintDocuments3.runOnUiThread(local4);
          }
          for (;;)
          {
            ActivityPrintDocuments.access$602(ActivityPrintDocuments.this, null);
            return;
            localUri = localIntent.getData();
            break;
            localFileOutputStream.close();
            localInputStream.close();
            int m = K2render.setDPI(300);
            if (m != 0) {
              throw new ActivityPrintDocuments.RenderError(m);
            }
            String str4 = ActivityPrintDocuments.this.doc_file.getAbsolutePath();
            K2render.ReadingCallback local2 = new K2render.ReadingCallback()
            {
              public void on_reading(final int paramAnonymousInt)
              {
                ActivityPrintDocuments.this.runOnUiThread(new Runnable()
                {
                  public void run()
                  {
                    ActivityPrintDocuments localActivityPrintDocuments = ActivityPrintDocuments.this;
                    String str = ActivityPrintDocuments.this.getResources().getString(2131099758);
                    Object[] arrayOfObject = new Object[1];
                    arrayOfObject[0] = (paramAnonymousInt + "%");
                    localActivityPrintDocuments.showProgress(String.format(str, arrayOfObject));
                  }
                });
              }
            };
            int n = K2render.openFile(str4, 0, local2);
            int i1 = K2render.getPageCount();
            if ((n != 0) && (i1 < 1)) {
              throw new ActivityPrintDocuments.RenderError(n);
            }
            ActivityPrintDocuments localActivityPrintDocuments5 = ActivityPrintDocuments.this;
            Runnable local3 = new Runnable()
            {
              public void run()
              {
                ActivityPrintDocuments.this.showProgress(ActivityPrintDocuments.this.getResources().getString(2131099746));
              }
            };
            localActivityPrintDocuments5.runOnUiThread(local3);
            for (int i2 = 0; i2 < i1; i2++)
            {
              int[] arrayOfInt = new int[2];
              K2render.getPageSize(i2 + 1, 100, arrayOfInt);
              ActivityPrintDocuments.this.doc_pages.add(new ActivityPrintDocuments.DocPicture(ActivityPrintDocuments.this, i2 + 1, arrayOfInt[0], arrayOfInt[1]));
            }
            break label385;
            str1 = null;
            break label378;
            ActivityPrintDocuments localActivityPrintDocuments2 = ActivityPrintDocuments.this;
            Runnable local5 = new Runnable()
            {
              public void run()
              {
                ActivityPrintDocuments.this.hideProgress();
                ActivityPrintDocuments.this.displayLastError(new DialogInterface.OnClickListener()
                {
                  public void onClick(DialogInterface paramAnonymous2DialogInterface, int paramAnonymous2Int) {}
                });
              }
            };
            localActivityPrintDocuments2.runOnUiThread(local5);
          }
          int i = 5;
        }
      }
      str2 = localUri.toString();
      if (str2.indexOf("file:/") < 0)
      {
        i = str2.indexOf(App.ext_storage_root);
        if (i >= 0)
        {
          str3 = str2.substring(i);
          j = str3.indexOf("?");
          if (j >= 0) {
            str3 = str3.substring(0, j);
          }
          k = str3.indexOf("#");
          if (k >= 0) {
            str3 = str3.substring(0, k);
          }
          localActivityPrintDocuments4 = ActivityPrintDocuments.this;
          localFile2 = new File(str3);
          ActivityPrintDocuments.access$302(localActivityPrintDocuments4, localFile2);
          if ((!ActivityPrintDocuments.this.doc_file.isFile()) || (!ActivityPrintDocuments.this.doc_file.exists()) || (!ActivityPrintDocuments.this.doc_file.canRead())) {
            ActivityPrintDocuments.access$302(ActivityPrintDocuments.this, null);
          }
        }
        if (ActivityPrintDocuments.this.doc_file == null)
        {
          ActivityPrintDocuments.access$302(ActivityPrintDocuments.this, ActivityPrintDocuments.this.tf);
          localInputStream = ActivityPrintDocuments.this.getContentResolver().openInputStream(localUri);
          localFileOutputStream = new FileOutputStream(ActivityPrintDocuments.this.doc_file);
          arrayOfByte = new byte[4096];
          for (;;)
          {
            int i3 = localInputStream.read(arrayOfByte);
            if (i3 == -1) {
              break;
            }
            localFileOutputStream.write(arrayOfByte, 0, i3);
          }
        }
      }
    }
  }
  
  class DocPicture
    extends Picture
  {
    private int height;
    private boolean landscape;
    private int num;
    private int width;
    
    public DocPicture(int paramInt1, int paramInt2, int paramInt3)
    {
      this.num = paramInt1;
      this.width = paramInt2;
      this.height = paramInt3;
      if (paramInt2 > paramInt3) {}
      for (boolean bool = true;; bool = false)
      {
        this.landscape = bool;
        return;
      }
    }
    
    public void draw(Canvas paramCanvas)
    {
      draw(paramCanvas, true);
    }
    
    /* Error */
    public void draw(Canvas paramCanvas, boolean paramBoolean)
    {
      // Byte code:
      //   0: aload_1
      //   1: invokevirtual 42	android/graphics/Canvas:save	()I
      //   4: pop
      //   5: aload_1
      //   6: iconst_m1
      //   7: invokevirtual 46	android/graphics/Canvas:drawColor	(I)V
      //   10: bipush 100
      //   12: aload_0
      //   13: getfield 16	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:this$0	Lcom/dynamixsoftware/printershare/ActivityPrintDocuments;
      //   16: getfield 52	com/dynamixsoftware/printershare/ActivityPrintDocuments:paper	Lcom/dynamixsoftware/printershare/data/Paper;
      //   19: getfield 55	com/dynamixsoftware/printershare/data/Paper:width	I
      //   22: imul
      //   23: sipush 254
      //   26: idiv
      //   27: istore 6
      //   29: bipush 100
      //   31: aload_0
      //   32: getfield 16	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:this$0	Lcom/dynamixsoftware/printershare/ActivityPrintDocuments;
      //   35: getfield 52	com/dynamixsoftware/printershare/ActivityPrintDocuments:paper	Lcom/dynamixsoftware/printershare/data/Paper;
      //   38: getfield 56	com/dynamixsoftware/printershare/data/Paper:height	I
      //   41: imul
      //   42: sipush 254
      //   45: idiv
      //   46: istore 7
      //   48: aload_0
      //   49: getfield 16	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:this$0	Lcom/dynamixsoftware/printershare/ActivityPrintDocuments;
      //   52: invokestatic 60	com/dynamixsoftware/printershare/ActivityPrintDocuments:access$000	(Lcom/dynamixsoftware/printershare/ActivityPrintDocuments;)I
      //   55: iconst_2
      //   56: if_icmpne +47 -> 103
      //   59: bipush 100
      //   61: aload_0
      //   62: getfield 16	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:this$0	Lcom/dynamixsoftware/printershare/ActivityPrintDocuments;
      //   65: getfield 52	com/dynamixsoftware/printershare/ActivityPrintDocuments:paper	Lcom/dynamixsoftware/printershare/data/Paper;
      //   68: getfield 64	com/dynamixsoftware/printershare/data/Paper:image_area	Landroid/graphics/Rect;
      //   71: invokevirtual 68	android/graphics/Rect:width	()I
      //   74: imul
      //   75: sipush 254
      //   78: idiv
      //   79: istore 6
      //   81: bipush 100
      //   83: aload_0
      //   84: getfield 16	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:this$0	Lcom/dynamixsoftware/printershare/ActivityPrintDocuments;
      //   87: getfield 52	com/dynamixsoftware/printershare/ActivityPrintDocuments:paper	Lcom/dynamixsoftware/printershare/data/Paper;
      //   90: getfield 64	com/dynamixsoftware/printershare/data/Paper:image_area	Landroid/graphics/Rect;
      //   93: invokevirtual 70	android/graphics/Rect:height	()I
      //   96: imul
      //   97: sipush 254
      //   100: idiv
      //   101: istore 7
      //   103: aload_0
      //   104: getfield 27	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:landscape	Z
      //   107: ifeq +15 -> 122
      //   110: iload 6
      //   112: istore 8
      //   114: iload 7
      //   116: istore 6
      //   118: iload 8
      //   120: istore 7
      //   122: aload_0
      //   123: getfield 23	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:width	I
      //   126: istore 9
      //   128: aload_0
      //   129: getfield 25	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:height	I
      //   132: istore 10
      //   134: aload_0
      //   135: getfield 16	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:this$0	Lcom/dynamixsoftware/printershare/ActivityPrintDocuments;
      //   138: invokestatic 60	com/dynamixsoftware/printershare/ActivityPrintDocuments:access$000	(Lcom/dynamixsoftware/printershare/ActivityPrintDocuments;)I
      //   141: iconst_2
      //   142: if_icmpne +81 -> 223
      //   145: aload_0
      //   146: getfield 27	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:landscape	Z
      //   149: ifeq +644 -> 793
      //   152: aload_1
      //   153: bipush 100
      //   155: aload_0
      //   156: getfield 16	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:this$0	Lcom/dynamixsoftware/printershare/ActivityPrintDocuments;
      //   159: getfield 52	com/dynamixsoftware/printershare/ActivityPrintDocuments:paper	Lcom/dynamixsoftware/printershare/data/Paper;
      //   162: getfield 64	com/dynamixsoftware/printershare/data/Paper:image_area	Landroid/graphics/Rect;
      //   165: getfield 73	android/graphics/Rect:top	I
      //   168: imul
      //   169: sipush 254
      //   172: idiv
      //   173: i2f
      //   174: bipush 100
      //   176: aload_0
      //   177: getfield 16	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:this$0	Lcom/dynamixsoftware/printershare/ActivityPrintDocuments;
      //   180: getfield 52	com/dynamixsoftware/printershare/ActivityPrintDocuments:paper	Lcom/dynamixsoftware/printershare/data/Paper;
      //   183: getfield 55	com/dynamixsoftware/printershare/data/Paper:width	I
      //   186: aload_0
      //   187: getfield 16	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:this$0	Lcom/dynamixsoftware/printershare/ActivityPrintDocuments;
      //   190: getfield 52	com/dynamixsoftware/printershare/ActivityPrintDocuments:paper	Lcom/dynamixsoftware/printershare/data/Paper;
      //   193: getfield 64	com/dynamixsoftware/printershare/data/Paper:image_area	Landroid/graphics/Rect;
      //   196: invokevirtual 68	android/graphics/Rect:width	()I
      //   199: isub
      //   200: aload_0
      //   201: getfield 16	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:this$0	Lcom/dynamixsoftware/printershare/ActivityPrintDocuments;
      //   204: getfield 52	com/dynamixsoftware/printershare/ActivityPrintDocuments:paper	Lcom/dynamixsoftware/printershare/data/Paper;
      //   207: getfield 64	com/dynamixsoftware/printershare/data/Paper:image_area	Landroid/graphics/Rect;
      //   210: getfield 76	android/graphics/Rect:left	I
      //   213: isub
      //   214: imul
      //   215: sipush 254
      //   218: idiv
      //   219: i2f
      //   220: invokevirtual 80	android/graphics/Canvas:translate	(FF)V
      //   223: aload_0
      //   224: getfield 16	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:this$0	Lcom/dynamixsoftware/printershare/ActivityPrintDocuments;
      //   227: invokestatic 60	com/dynamixsoftware/printershare/ActivityPrintDocuments:access$000	(Lcom/dynamixsoftware/printershare/ActivityPrintDocuments;)I
      //   230: ifle +87 -> 317
      //   233: new 82	android/graphics/RectF
      //   236: dup
      //   237: fconst_0
      //   238: fconst_0
      //   239: iload 6
      //   241: i2f
      //   242: iload 10
      //   244: iload 6
      //   246: imul
      //   247: iload 9
      //   249: idiv
      //   250: i2f
      //   251: invokespecial 85	android/graphics/RectF:<init>	(FFFF)V
      //   254: astore 11
      //   256: new 82	android/graphics/RectF
      //   259: dup
      //   260: fconst_0
      //   261: fconst_0
      //   262: iload 9
      //   264: iload 7
      //   266: imul
      //   267: iload 10
      //   269: idiv
      //   270: i2f
      //   271: iload 7
      //   273: i2f
      //   274: invokespecial 85	android/graphics/RectF:<init>	(FFFF)V
      //   277: astore 12
      //   279: aload 11
      //   281: invokevirtual 88	android/graphics/RectF:height	()F
      //   284: iload 7
      //   286: i2f
      //   287: fcmpl
      //   288: ifle +588 -> 876
      //   291: aload 12
      //   293: astore 13
      //   295: aload_1
      //   296: aload 13
      //   298: invokevirtual 90	android/graphics/RectF:width	()F
      //   301: iload 9
      //   303: i2f
      //   304: fdiv
      //   305: aload 13
      //   307: invokevirtual 88	android/graphics/RectF:height	()F
      //   310: iload 10
      //   312: i2f
      //   313: fdiv
      //   314: invokevirtual 93	android/graphics/Canvas:scale	(FF)V
      //   317: new 82	android/graphics/RectF
      //   320: dup
      //   321: invokespecial 94	android/graphics/RectF:<init>	()V
      //   324: astore 14
      //   326: aload_1
      //   327: invokevirtual 98	android/graphics/Canvas:getMatrix	()Landroid/graphics/Matrix;
      //   330: astore 15
      //   332: aload 15
      //   334: aload 14
      //   336: new 82	android/graphics/RectF
      //   339: dup
      //   340: fconst_0
      //   341: fconst_0
      //   342: aload_0
      //   343: getfield 23	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:width	I
      //   346: i2f
      //   347: aload_0
      //   348: getfield 25	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:height	I
      //   351: i2f
      //   352: invokespecial 85	android/graphics/RectF:<init>	(FFFF)V
      //   355: invokevirtual 104	android/graphics/Matrix:mapRect	(Landroid/graphics/RectF;Landroid/graphics/RectF;)Z
      //   358: pop
      //   359: aload 14
      //   361: invokevirtual 90	android/graphics/RectF:width	()F
      //   364: aload_0
      //   365: getfield 23	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:width	I
      //   368: i2f
      //   369: fdiv
      //   370: fstore 17
      //   372: aload 14
      //   374: invokevirtual 88	android/graphics/RectF:height	()F
      //   377: aload_0
      //   378: getfield 25	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:height	I
      //   381: i2f
      //   382: fdiv
      //   383: fstore 18
      //   385: fload 18
      //   387: fload 17
      //   389: fcmpl
      //   390: ifle +493 -> 883
      //   393: fload 18
      //   395: fstore 19
      //   397: aload_1
      //   398: fconst_1
      //   399: fload 19
      //   401: fdiv
      //   402: fconst_1
      //   403: fload 19
      //   405: fdiv
      //   406: invokevirtual 93	android/graphics/Canvas:scale	(FF)V
      //   409: aload 14
      //   411: getfield 107	android/graphics/RectF:left	F
      //   414: fconst_0
      //   415: fcmpg
      //   416: ifge +474 -> 890
      //   419: aload 14
      //   421: getfield 107	android/graphics/RectF:left	F
      //   424: fstore 20
      //   426: aload 14
      //   428: getfield 109	android/graphics/RectF:top	F
      //   431: fconst_0
      //   432: fcmpg
      //   433: ifge +463 -> 896
      //   436: aload 14
      //   438: getfield 109	android/graphics/RectF:top	F
      //   441: fstore 21
      //   443: aload 14
      //   445: invokevirtual 90	android/graphics/RectF:width	()F
      //   448: fload 20
      //   450: fsub
      //   451: aload_1
      //   452: invokevirtual 112	android/graphics/Canvas:getWidth	()I
      //   455: i2f
      //   456: fcmpl
      //   457: ifle +9 -> 466
      //   460: aload_1
      //   461: invokevirtual 112	android/graphics/Canvas:getWidth	()I
      //   464: i2f
      //   465: pop
      //   466: aload 14
      //   468: invokevirtual 88	android/graphics/RectF:height	()F
      //   471: fload 21
      //   473: fsub
      //   474: aload_1
      //   475: invokevirtual 115	android/graphics/Canvas:getHeight	()I
      //   478: i2f
      //   479: fcmpl
      //   480: ifle +9 -> 489
      //   483: aload_1
      //   484: invokevirtual 115	android/graphics/Canvas:getHeight	()I
      //   487: i2f
      //   488: pop
      //   489: fload 19
      //   491: aload_0
      //   492: getfield 23	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:width	I
      //   495: i2f
      //   496: fmul
      //   497: invokestatic 121	java/lang/Math:round	(F)I
      //   500: istore 22
      //   502: fload 19
      //   504: aload_0
      //   505: getfield 25	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:height	I
      //   508: i2f
      //   509: fmul
      //   510: invokestatic 121	java/lang/Math:round	(F)I
      //   513: istore 23
      //   515: aload_1
      //   516: invokevirtual 98	android/graphics/Canvas:getMatrix	()Landroid/graphics/Matrix;
      //   519: aload 15
      //   521: invokevirtual 125	android/graphics/Matrix:invert	(Landroid/graphics/Matrix;)Z
      //   524: pop
      //   525: aload 15
      //   527: aload 14
      //   529: new 82	android/graphics/RectF
      //   532: dup
      //   533: fconst_0
      //   534: fconst_0
      //   535: aload_1
      //   536: invokevirtual 112	android/graphics/Canvas:getWidth	()I
      //   539: i2f
      //   540: aload_1
      //   541: invokevirtual 115	android/graphics/Canvas:getHeight	()I
      //   544: i2f
      //   545: invokespecial 85	android/graphics/RectF:<init>	(FFFF)V
      //   548: invokevirtual 104	android/graphics/Matrix:mapRect	(Landroid/graphics/RectF;Landroid/graphics/RectF;)Z
      //   551: pop
      //   552: aload 14
      //   554: getfield 107	android/graphics/RectF:left	F
      //   557: fconst_0
      //   558: fcmpl
      //   559: ifle +343 -> 902
      //   562: aload 14
      //   564: getfield 107	android/graphics/RectF:left	F
      //   567: invokestatic 121	java/lang/Math:round	(F)I
      //   570: istore 26
      //   572: aload 14
      //   574: getfield 109	android/graphics/RectF:top	F
      //   577: fconst_0
      //   578: fcmpl
      //   579: ifle +329 -> 908
      //   582: aload 14
      //   584: getfield 109	android/graphics/RectF:top	F
      //   587: invokestatic 121	java/lang/Math:round	(F)I
      //   590: istore 27
      //   592: aload 14
      //   594: getfield 128	android/graphics/RectF:right	F
      //   597: iload 22
      //   599: i2f
      //   600: fcmpg
      //   601: ifge +313 -> 914
      //   604: aload 14
      //   606: getfield 128	android/graphics/RectF:right	F
      //   609: invokestatic 121	java/lang/Math:round	(F)I
      //   612: istore 28
      //   614: iload 28
      //   616: iload 26
      //   618: isub
      //   619: istore 29
      //   621: aload 14
      //   623: getfield 131	android/graphics/RectF:bottom	F
      //   626: iload 23
      //   628: i2f
      //   629: fcmpg
      //   630: ifge +291 -> 921
      //   633: aload 14
      //   635: getfield 131	android/graphics/RectF:bottom	F
      //   638: invokestatic 121	java/lang/Math:round	(F)I
      //   641: istore 30
      //   643: iload 30
      //   645: iload 27
      //   647: isub
      //   648: istore 31
      //   650: invokestatic 137	com/dynamixsoftware/printershare/App:newPaint	()Landroid/graphics/Paint;
      //   653: astore 32
      //   655: iload 29
      //   657: istore 33
      //   659: iload 31
      //   661: istore 34
      //   663: iload_2
      //   664: ifeq +264 -> 928
      //   667: getstatic 143	android/graphics/Bitmap$Config:ARGB_8888	Landroid/graphics/Bitmap$Config;
      //   670: astore 45
      //   672: iload 33
      //   674: iload 34
      //   676: aload 45
      //   678: invokestatic 149	android/graphics/Bitmap:createBitmap	(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
      //   681: astore 46
      //   683: aload 46
      //   685: astore 37
      //   687: iconst_0
      //   688: istore 38
      //   690: iload 38
      //   692: iload 31
      //   694: if_icmpge +94 -> 788
      //   697: iload 26
      //   699: istore 39
      //   701: iload 27
      //   703: iload 38
      //   705: iadd
      //   706: istore 40
      //   708: iload 33
      //   710: istore 41
      //   712: iload 34
      //   714: istore 42
      //   716: iload 38
      //   718: iload 34
      //   720: iadd
      //   721: iload 31
      //   723: if_icmple +10 -> 733
      //   726: iload 31
      //   728: iload 38
      //   730: isub
      //   731: istore 42
      //   733: iload_2
      //   734: ifeq +313 -> 1047
      //   737: aload_0
      //   738: getfield 21	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:num	I
      //   741: iload 22
      //   743: iload 23
      //   745: iload 39
      //   747: iload 40
      //   749: iload 41
      //   751: iload 42
      //   753: iconst_0
      //   754: aload 37
      //   756: invokestatic 155	com/dynamixsoftware/printershare/K2render:drawPage	(IIIIIIIZLandroid/graphics/Bitmap;)I
      //   759: istore 44
      //   761: iload 44
      //   763: ifeq +235 -> 998
      //   766: new 157	com/dynamixsoftware/printershare/ActivityPrintDocuments$RenderError
      //   769: dup
      //   770: iload 44
      //   772: invokespecial 159	com/dynamixsoftware/printershare/ActivityPrintDocuments$RenderError:<init>	(I)V
      //   775: athrow
      //   776: astore 5
      //   778: aload 5
      //   780: invokevirtual 162	java/lang/Throwable:printStackTrace	()V
      //   783: aload 5
      //   785: invokestatic 166	com/dynamixsoftware/printershare/App:reportThrowable	(Ljava/lang/Throwable;)V
      //   788: aload_1
      //   789: invokevirtual 169	android/graphics/Canvas:restore	()V
      //   792: return
      //   793: aload_1
      //   794: bipush 100
      //   796: aload_0
      //   797: getfield 16	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:this$0	Lcom/dynamixsoftware/printershare/ActivityPrintDocuments;
      //   800: getfield 52	com/dynamixsoftware/printershare/ActivityPrintDocuments:paper	Lcom/dynamixsoftware/printershare/data/Paper;
      //   803: getfield 64	com/dynamixsoftware/printershare/data/Paper:image_area	Landroid/graphics/Rect;
      //   806: getfield 76	android/graphics/Rect:left	I
      //   809: imul
      //   810: sipush 254
      //   813: idiv
      //   814: i2f
      //   815: bipush 100
      //   817: aload_0
      //   818: getfield 16	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:this$0	Lcom/dynamixsoftware/printershare/ActivityPrintDocuments;
      //   821: getfield 52	com/dynamixsoftware/printershare/ActivityPrintDocuments:paper	Lcom/dynamixsoftware/printershare/data/Paper;
      //   824: getfield 56	com/dynamixsoftware/printershare/data/Paper:height	I
      //   827: aload_0
      //   828: getfield 16	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:this$0	Lcom/dynamixsoftware/printershare/ActivityPrintDocuments;
      //   831: getfield 52	com/dynamixsoftware/printershare/ActivityPrintDocuments:paper	Lcom/dynamixsoftware/printershare/data/Paper;
      //   834: getfield 64	com/dynamixsoftware/printershare/data/Paper:image_area	Landroid/graphics/Rect;
      //   837: invokevirtual 70	android/graphics/Rect:height	()I
      //   840: isub
      //   841: aload_0
      //   842: getfield 16	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:this$0	Lcom/dynamixsoftware/printershare/ActivityPrintDocuments;
      //   845: getfield 52	com/dynamixsoftware/printershare/ActivityPrintDocuments:paper	Lcom/dynamixsoftware/printershare/data/Paper;
      //   848: getfield 64	com/dynamixsoftware/printershare/data/Paper:image_area	Landroid/graphics/Rect;
      //   851: getfield 73	android/graphics/Rect:top	I
      //   854: isub
      //   855: imul
      //   856: sipush 254
      //   859: idiv
      //   860: i2f
      //   861: invokevirtual 80	android/graphics/Canvas:translate	(FF)V
      //   864: goto -641 -> 223
      //   867: astore 4
      //   869: aload_1
      //   870: invokevirtual 169	android/graphics/Canvas:restore	()V
      //   873: aload 4
      //   875: athrow
      //   876: aload 11
      //   878: astore 13
      //   880: goto -585 -> 295
      //   883: fload 17
      //   885: fstore 19
      //   887: goto -490 -> 397
      //   890: fconst_0
      //   891: fstore 20
      //   893: goto -467 -> 426
      //   896: fconst_0
      //   897: fstore 21
      //   899: goto -456 -> 443
      //   902: iconst_0
      //   903: istore 26
      //   905: goto -333 -> 572
      //   908: iconst_0
      //   909: istore 27
      //   911: goto -319 -> 592
      //   914: iload 22
      //   916: istore 28
      //   918: goto -304 -> 614
      //   921: iload 23
      //   923: istore 30
      //   925: goto -282 -> 643
      //   928: iload 33
      //   930: iconst_4
      //   931: idiv
      //   932: iload 34
      //   934: iconst_4
      //   935: idiv
      //   936: getstatic 143	android/graphics/Bitmap$Config:ARGB_8888	Landroid/graphics/Bitmap$Config;
      //   939: invokestatic 149	android/graphics/Bitmap:createBitmap	(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
      //   942: astore 36
      //   944: aload 36
      //   946: astore 37
      //   948: goto -261 -> 687
      //   951: astore 35
      //   953: iload 34
      //   955: bipush 64
      //   957: if_icmple +17 -> 974
      //   960: iload 34
      //   962: iconst_2
      //   963: idiv
      //   964: iload 34
      //   966: iconst_2
      //   967: irem
      //   968: iadd
      //   969: istore 34
      //   971: goto -308 -> 663
      //   974: iload 33
      //   976: bipush 64
      //   978: if_icmple +17 -> 995
      //   981: iload 33
      //   983: iconst_2
      //   984: idiv
      //   985: iload 33
      //   987: iconst_2
      //   988: irem
      //   989: iadd
      //   990: istore 33
      //   992: goto -329 -> 663
      //   995: aload 35
      //   997: athrow
      //   998: aload_1
      //   999: aload 37
      //   1001: new 66	android/graphics/Rect
      //   1004: dup
      //   1005: iconst_0
      //   1006: iconst_0
      //   1007: iload 41
      //   1009: iload 42
      //   1011: invokespecial 172	android/graphics/Rect:<init>	(IIII)V
      //   1014: new 82	android/graphics/RectF
      //   1017: dup
      //   1018: iload 39
      //   1020: i2f
      //   1021: iload 40
      //   1023: i2f
      //   1024: iload 39
      //   1026: iload 41
      //   1028: iadd
      //   1029: i2f
      //   1030: iload 40
      //   1032: iload 42
      //   1034: iadd
      //   1035: i2f
      //   1036: invokespecial 85	android/graphics/RectF:<init>	(FFFF)V
      //   1039: aload 32
      //   1041: invokevirtual 176	android/graphics/Canvas:drawBitmap	(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/RectF;Landroid/graphics/Paint;)V
      //   1044: goto +104 -> 1148
      //   1047: aload_0
      //   1048: getfield 21	com/dynamixsoftware/printershare/ActivityPrintDocuments$DocPicture:num	I
      //   1051: iload 22
      //   1053: iconst_4
      //   1054: idiv
      //   1055: iload 23
      //   1057: iconst_4
      //   1058: idiv
      //   1059: iload 39
      //   1061: iconst_4
      //   1062: idiv
      //   1063: iload 40
      //   1065: iconst_4
      //   1066: idiv
      //   1067: iload 41
      //   1069: iconst_4
      //   1070: idiv
      //   1071: iload 42
      //   1073: iconst_4
      //   1074: idiv
      //   1075: iconst_0
      //   1076: aload 37
      //   1078: invokestatic 155	com/dynamixsoftware/printershare/K2render:drawPage	(IIIIIIIZLandroid/graphics/Bitmap;)I
      //   1081: istore 43
      //   1083: iload 43
      //   1085: ifeq +13 -> 1098
      //   1088: new 157	com/dynamixsoftware/printershare/ActivityPrintDocuments$RenderError
      //   1091: dup
      //   1092: iload 43
      //   1094: invokespecial 159	com/dynamixsoftware/printershare/ActivityPrintDocuments$RenderError:<init>	(I)V
      //   1097: athrow
      //   1098: aload_1
      //   1099: aload 37
      //   1101: new 66	android/graphics/Rect
      //   1104: dup
      //   1105: iconst_0
      //   1106: iconst_0
      //   1107: iload 41
      //   1109: iconst_4
      //   1110: idiv
      //   1111: iload 42
      //   1113: iconst_4
      //   1114: idiv
      //   1115: invokespecial 172	android/graphics/Rect:<init>	(IIII)V
      //   1118: new 82	android/graphics/RectF
      //   1121: dup
      //   1122: iload 39
      //   1124: i2f
      //   1125: iload 40
      //   1127: i2f
      //   1128: iload 39
      //   1130: iload 41
      //   1132: iadd
      //   1133: i2f
      //   1134: iload 40
      //   1136: iload 42
      //   1138: iadd
      //   1139: i2f
      //   1140: invokespecial 85	android/graphics/RectF:<init>	(FFFF)V
      //   1143: aload 32
      //   1145: invokevirtual 176	android/graphics/Canvas:drawBitmap	(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/RectF;Landroid/graphics/Paint;)V
      //   1148: iload 38
      //   1150: iload 42
      //   1152: iadd
      //   1153: istore 38
      //   1155: goto -465 -> 690
      // Local variable table:
      //   start	length	slot	name	signature
      //   0	1158	0	this	DocPicture
      //   0	1158	1	paramCanvas	Canvas
      //   0	1158	2	paramBoolean	boolean
      //   867	7	4	localObject1	Object
      //   776	8	5	localThrowable	Throwable
      //   27	220	6	i	int
      //   46	239	7	j	int
      //   112	7	8	k	int
      //   126	176	9	m	int
      //   132	179	10	n	int
      //   254	623	11	localRectF1	android.graphics.RectF
      //   277	15	12	localRectF2	android.graphics.RectF
      //   293	586	13	localRectF3	android.graphics.RectF
      //   324	310	14	localRectF4	android.graphics.RectF
      //   330	196	15	localMatrix	android.graphics.Matrix
      //   370	514	17	f1	float
      //   383	11	18	f2	float
      //   395	491	19	f3	float
      //   424	468	20	f4	float
      //   441	457	21	f5	float
      //   500	555	22	i1	int
      //   513	546	23	i2	int
      //   570	334	26	i3	int
      //   590	320	27	i4	int
      //   612	305	28	i5	int
      //   619	37	29	i6	int
      //   641	283	30	i7	int
      //   648	83	31	i8	int
      //   653	491	32	localPaint	android.graphics.Paint
      //   657	334	33	i9	int
      //   661	309	34	i10	int
      //   951	45	35	localOutOfMemoryError	OutOfMemoryError
      //   942	3	36	localBitmap1	Bitmap
      //   685	415	37	localObject2	Object
      //   688	466	38	i11	int
      //   699	434	39	i12	int
      //   706	433	40	i13	int
      //   710	423	41	i14	int
      //   714	439	42	i15	int
      //   1081	12	43	i16	int
      //   759	12	44	i17	int
      //   670	7	45	localConfig	Bitmap.Config
      //   681	3	46	localBitmap2	Bitmap
      // Exception table:
      //   from	to	target	type
      //   5	103	776	java/lang/Throwable
      //   103	110	776	java/lang/Throwable
      //   122	223	776	java/lang/Throwable
      //   223	291	776	java/lang/Throwable
      //   295	317	776	java/lang/Throwable
      //   317	385	776	java/lang/Throwable
      //   397	426	776	java/lang/Throwable
      //   426	443	776	java/lang/Throwable
      //   443	466	776	java/lang/Throwable
      //   466	489	776	java/lang/Throwable
      //   489	572	776	java/lang/Throwable
      //   572	592	776	java/lang/Throwable
      //   592	614	776	java/lang/Throwable
      //   621	643	776	java/lang/Throwable
      //   650	655	776	java/lang/Throwable
      //   667	683	776	java/lang/Throwable
      //   737	761	776	java/lang/Throwable
      //   766	776	776	java/lang/Throwable
      //   793	864	776	java/lang/Throwable
      //   928	944	776	java/lang/Throwable
      //   960	971	776	java/lang/Throwable
      //   981	992	776	java/lang/Throwable
      //   995	998	776	java/lang/Throwable
      //   998	1044	776	java/lang/Throwable
      //   1047	1083	776	java/lang/Throwable
      //   1088	1098	776	java/lang/Throwable
      //   1098	1148	776	java/lang/Throwable
      //   5	103	867	finally
      //   103	110	867	finally
      //   122	223	867	finally
      //   223	291	867	finally
      //   295	317	867	finally
      //   317	385	867	finally
      //   397	426	867	finally
      //   426	443	867	finally
      //   443	466	867	finally
      //   466	489	867	finally
      //   489	572	867	finally
      //   572	592	867	finally
      //   592	614	867	finally
      //   621	643	867	finally
      //   650	655	867	finally
      //   667	683	867	finally
      //   737	761	867	finally
      //   766	776	867	finally
      //   778	788	867	finally
      //   793	864	867	finally
      //   928	944	867	finally
      //   960	971	867	finally
      //   981	992	867	finally
      //   995	998	867	finally
      //   998	1044	867	finally
      //   1047	1083	867	finally
      //   1088	1098	867	finally
      //   1098	1148	867	finally
      //   667	683	951	java/lang/OutOfMemoryError
      //   928	944	951	java/lang/OutOfMemoryError
    }
    
    public int getHeight()
    {
      if (this.landscape) {
        return 100 * ActivityPrintDocuments.this.paper.width / 254;
      }
      return 100 * ActivityPrintDocuments.this.paper.height / 254;
    }
    
    public int getWidth()
    {
      if (this.landscape) {
        return 100 * ActivityPrintDocuments.this.paper.height / 254;
      }
      return 100 * ActivityPrintDocuments.this.paper.width / 254;
    }
  }
  
  class InstallRenderThread
    extends Thread
  {
    InstallRenderThread() {}
    
    public void run()
    {
      ActivityPrintDocuments.this.runOnUiThread(new Runnable()
      {
        public void run()
        {
          ActivityPrintDocuments.this.showProgress(ActivityPrintDocuments.this.getResources().getString(2131099746));
        }
      });
      ActivityPrintDocuments.this.last_error = null;
      for (;;)
      {
        try
        {
          ActivityPrintDocuments.this.installDrvLibPack("lib_docsrender|3.4.5", true, 0, 50);
          ActivityPrintDocuments.this.installDrvLibPack("lib_extra_fonts|1.0.2", false, 50, 100);
          if ((!new File("/system/lib/libskia.so").exists()) && (new File("/system/lib/libsgl.so").exists()))
          {
            File localFile = new File(App.getFilesDirInt("lib_docsrender"), "libdocsrenderJNI.so");
            BufferedInputStream localBufferedInputStream = new BufferedInputStream(new FileInputStream(localFile), 4096);
            byte[] arrayOfByte = { 108, 105, 98, 115, 107, 105, 97, 46, 115, 111 };
            i = 0;
            j = 0;
            k = -1;
            int m = localBufferedInputStream.read();
            if (m != -1)
            {
              if (arrayOfByte[i] != m) {
                continue;
              }
              if (i == 0) {
                k = j;
              }
              i++;
              if (i != arrayOfByte.length) {
                continue;
              }
            }
            localBufferedInputStream.close();
            if (k != -1)
            {
              RandomAccessFile localRandomAccessFile = new RandomAccessFile(localFile, "rw");
              localRandomAccessFile.seek(k + 4);
              localRandomAccessFile.write(new byte[] { 103, 108, 46, 115, 111, 0 });
              localRandomAccessFile.close();
            }
          }
        }
        catch (Exception localException)
        {
          int i;
          int j;
          int k;
          localException.printStackTrace();
          ActivityPrintDocuments.this.last_error = ("Internal Error: " + localException.getMessage());
          App.reportThrowable(localException);
          continue;
          ActivityPrintDocuments.this.runOnUiThread(new Runnable()
          {
            public void run()
            {
              ActivityPrintDocuments.this.hideProgress();
              ActivityPrintDocuments.this.displayLastError(new DialogInterface.OnClickListener()
              {
                public void onClick(DialogInterface paramAnonymous2DialogInterface, int paramAnonymous2Int) {}
              });
            }
          });
          continue;
        }
        if (ActivityPrintDocuments.this.last_error != null) {
          continue;
        }
        ActivityPrintDocuments.this.runOnUiThread(new Runnable()
        {
          public void run()
          {
            ActivityPrintDocuments.access$602(ActivityPrintDocuments.this, new ActivityPrintDocuments.CheckRenderThread(ActivityPrintDocuments.this, Boolean.valueOf(false)));
            ActivityPrintDocuments.this.wt.start();
          }
        });
        ActivityPrintDocuments.access$602(ActivityPrintDocuments.this, null);
        return;
        i = 0;
        k = -1;
        j++;
      }
    }
  }
  
  static class RenderError
    extends Exception
  {
    public int err_no;
    
    public RenderError(int paramInt)
    {
      super();
      this.err_no = paramInt;
    }
  }
}


/* Location:           C:\Users\Admin\Desktop\Decompiler\JAD\jd-gui-0.3.6.windows\classes_dex2jar.jar
 * Qualified Name:     com.dynamixsoftware.printershare.ActivityPrintDocuments
 * JD-Core Version:    0.7.0.1
 */